**************************************************************************
*																		*
*			Campaign Panel Book Chapter 5 - Cognitive Involvement		*
*																		*
*************************************************************************

use "${data}\ZA5704_en_v3-2-0.dta", clear



********************************************************************************
**
** Interest
**
********************************************************************************

gen polintsplit = -1 if inlist(kp1_010, 4, 5)
replace polintsplit = 0 if 	kp1_010==3
replace polintsplit = 1 if inlist(kp1_010, 1, 2)

*Generate political interest variable, ranging from 0 to 1

gen polint=polintsplit
recode polint (0=0.5) (-1=0)
tab polint


tab kp1_010 polintsplit, m	


******************************************************************************
**																			**
**			 Party Identification Variable									**
**																			**
******************************************************************************


recode kp1_2090a (2/3=1 "CDU/CSU") (4=4 "SPD") ///
	(5=5 "FDP") (6=6 "Greens") (7=7 "The Left") (801=801 "andere Partei") ///
	(808=808 "no party") (-99=.), gen(pidfull1)

fre pidfull1


* Dummy: Party Identification yes/no
gen nopid1 = 0
replace nopid1 = 1 if pidfull1==808
replace nopid1 = . if pidfull1==.


tab nopid1 pidfull1, m

fre nopid1



*----------------------------------------
* Save
*---------------------------------------

keep lfdn polintsplit nopid1

save "${path}\Reproducible Do-Files\Chapter 5\Data\koginvolv13.dta", replace	


